package javax.microedition.lcdui;

import javax.microedition.midlet.MIDlet;

public class Display {
  public static final int COLOR_BACKGROUND = 0;

  public static final int COLOR_FOREGROUND = 1;

  public static final int LIST_ELEMENT = 1;

  public static final int CHOICE_GROUP_ELEMENT = 2;

  public static final int COLOR_HIGHLIGHTED_BACKGROUND = 2;

  public static final int ALERT = 3;

  public static final int COLOR_HIGHLIGHTED_FOREGROUND = 3;

  public static final int COLOR_BORDER = 4;

  public static final int COLOR_HIGHLIGHTED_BORDER = 5;

  public static Display CurrentDisplay;

  public MIDlet CurrentMIDlet;

  public static Displayable CurrentDisplayable;

  public Display() {
    Graphics.Init();
  }

  public boolean flashBacklight(int paramInt) {
    return false;
  }

  public boolean isColor() {
    return true;
  }

  public boolean vibrate(int paramInt) {
    return false;
  }

  public int getBestImageHeight(int paramInt) {
    return 0;
  }

  public int getBestImageWidth(int paramInt) {
    return 0;
  }

  public int getBorderStyle(boolean paramBoolean) {
    return 0;
  }

  public int getColor(int paramInt) {
    return 0;
  }

  public int numAlphaLevels() {
    return 256;
  }

  public int numColors() {
    return 65536;
  }

  public Displayable getCurrent() {
    return CurrentDisplayable;
  }

  public static Display getDisplay(MIDlet paramMIDlet) {
    if (CurrentDisplay == null) {
      CurrentDisplay = new Display();
    }
    CurrentDisplay.CurrentMIDlet = paramMIDlet;
    return CurrentDisplay;
  }

  public void callSerially(Runnable paramRunnable) {
  }

  public native static void ShowAlert(Alert paramAlert);

  public void setCurrent(Alert paramAlert, Displayable paramDisplayable) {
    ShowAlert(paramAlert);
    setCurrent(paramDisplayable);
  }

  public void setCurrent(Displayable paramDisplayable) {
    if (CurrentDisplayable == paramDisplayable)
      return;
    CurrentDisplayable = paramDisplayable;
    if (paramDisplayable != null) {
      paramDisplayable.SetDisplayableId();
      if (paramDisplayable instanceof Canvas) {
        Canvas canvas = (Canvas) CurrentDisplayable;
        canvas.paint(Graphics.CurrentGraphics);
        // if (false)
        // canvas.setFullScreenMode(true);

      } else if (paramDisplayable instanceof Screen) {
        Screen screen = (Screen) CurrentDisplayable;
        // screen.paint(CurrentGraphics);
        paramDisplayable.ShowTitle();
        if (paramDisplayable instanceof TextBox) {
          // ((TextBox)paramDisplayable).foucsCaret();
        }
      }
      // paramDisplayable.updateCommands();
    }

  }

  public void setCurrentItem(Item paramItem) {
  }
}

/*
 * Location:
 * C:\Java\rt\javax\microedition\midp_2.1.jar!\javax\microedition\lcdui\Display.
 * class
 * Java compiler version: 3 (47.0)
 * JD-Core Version: 1.1.3
 */